<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
<p><?php
const DISCOUNT=0.8;
$fruit1='香蕉';
$fruit2='苹果';
$fruit3='橘子';
$fruit1_num=2;
$fruit2_num=1;
$fruit3_num=3;
$fruit1_price=7.99;
$fruit2_price=6.89;
$fruit3_price=3.99;
echo $fruit1_total=$fruit1_num*$fruit1_price;
echo $fruit2_tota2=$fruit2_num*$fruit2_price;
echo $fruit3_tota3=$fruit3_num*$fruit3_price;
echo $total=($fruit1_total+$fruit2_tota1+$fruit3_tota1)*DISCOUNT;
?></p>
<table border="1" cellpadding="1" cellspacing="0">
<tr>
<td>商品名称</td>
<td>购买数量(斤)</td>
<td>商品价格(元/斤)</td>
</tr>
<tr>
<td> <?php echo $fruit1 ;?></td>
<td><?php echo $fruit1_num;?></td>
<td><?php echo $fruit1_price;?></td>
</tr>
<tr>
<td><?php echo $fruit2;?></td>
<td><?php echo $fruit2_num;?></td>
<td><?php echo $fruit2_price;?></td>
</tr>
<tr>
<td><?php echo $fruit3;?></td>
<td><?php echo $fruit3_num;?></td>
<td><?php echo $fruit3_price;?></td>
</tr>
<tr>
<td colspan="3">
商品折扣:<span><?php echo DISCOUNT?></span>
</td>
</tr>
<tr>
<td colspan="3">
打折后购买商品总价格：<?php echo $total;?>元
</td>
</tr>
</body>
</html>